/**
 * @license
 * Copyright Akveo. All Rights Reserved.
 * Licensed under the MIT License. See License.txt in the project root for license information.
 */

@import './input-statuses';
@import './input-sizes';
@import './input-shapes';

@mixin nb-input-theme() {

  [nbInput] {
    background-color: nb-theme(input-background-color);
    border-color: nb-theme(input-border-color);
    border-style: nb-theme(input-border-style);
    border-width: nb-theme(input-border-width);
    color: nb-theme(input-text-color);
    font-family: nb-theme(input-text-font-family);
    -webkit-appearance: none; // removes inner shadow on iOS

    @include nb-component-animation(border, background-color, color, box-shadow);

    &::placeholder {
      color: nb-theme(input-placeholder-text-color);
      font-family: nb-theme(input-placeholder-text-font-family);
      text-overflow: ellipsis;
    }

    &:focus {
      outline: none;
      border-color: nb-theme(input-focus-border-color);
      box-shadow: 0 0 0 nb-theme(input-outline-width) nb-theme(input-outline-color);
    }

    &:hover {
      border-color: nb-theme(input-hover-border-color);
    }

    &:disabled {
      background-color: nb-theme(input-disabled-background-color);
      border-color: nb-theme(input-disabled-border-color);
      color: nb-theme(input-disabled-text-color);

      &::placeholder {
        color: nb-theme(input-disabled-placeholder-text-color);
      }
    }

    &.input-full-width {
      width: 100%;
    }

    @include input-statuses();
    @include input-sizes();
    @include input-shapes();
  }
}
